﻿using System;
using System.Collections.Generic;
using Microsoft.Research.Kinect.Nui;
using System.Windows.Media;

namespace FLKRP.WP7.Server
{
    class Common
    {
        public const int ListenerPort = 9050;

        //Colors for Joints and Skeletons borrowed from MainWIndow.xaml.cs of the 
        //SkeletalViewer in the KinectResearch SDK
        //
        //Kinect SDK License License Agreement: http://research.microsoft.com/KinectSDK-ToU
        //
        //Kinect SKD Available at: http://research.microsoft.com/en-us/um/redmond/projects/kinectsdk/
        public static Dictionary<JointID, Brush> JointColors = new Dictionary<JointID, Brush>() { 
            {JointID.HipCenter, new SolidColorBrush(Color.FromRgb(169, 176, 155))},
            {JointID.Spine, new SolidColorBrush(Color.FromRgb(169, 176, 155))},
            {JointID.ShoulderCenter, new SolidColorBrush(Color.FromRgb(168, 230, 29))},
            {JointID.Head, new SolidColorBrush(Color.FromRgb(200, 0,   0))},
            {JointID.ShoulderLeft, new SolidColorBrush(Color.FromRgb(79,  84,  33))},
            {JointID.ElbowLeft, new SolidColorBrush(Color.FromRgb(84,  33,  42))},
            {JointID.WristLeft, new SolidColorBrush(Color.FromRgb(255, 126, 0))},
            {JointID.HandLeft, new SolidColorBrush(Color.FromRgb(215,  86, 0))},
            {JointID.ShoulderRight, new SolidColorBrush(Color.FromRgb(33,  79,  84))},
            {JointID.ElbowRight, new SolidColorBrush(Color.FromRgb(33,  33,  84))},
            {JointID.WristRight, new SolidColorBrush(Color.FromRgb(77,  109, 243))},
            {JointID.HandRight, new SolidColorBrush(Color.FromRgb(37,   69, 243))},
            {JointID.HipLeft, new SolidColorBrush(Color.FromRgb(77,  109, 243))},
            {JointID.KneeLeft, new SolidColorBrush(Color.FromRgb(69,  33,  84))},
            {JointID.AnkleLeft, new SolidColorBrush(Color.FromRgb(229, 170, 122))},
            {JointID.FootLeft, new SolidColorBrush(Color.FromRgb(255, 126, 0))},
            {JointID.HipRight, new SolidColorBrush(Color.FromRgb(181, 165, 213))},
            {JointID.KneeRight, new SolidColorBrush(Color.FromRgb(71, 222,  76))},
            {JointID.AnkleRight, new SolidColorBrush(Color.FromRgb(245, 228, 156))},
            {JointID.FootRight, new SolidColorBrush(Color.FromRgb(77,  109, 243))}
        };

         public static Brush[] SkeletalColors = new Brush[] {
                    new SolidColorBrush(Color.FromRgb(255, 0, 0)),
                    new SolidColorBrush(Color.FromRgb(0, 255, 0)),
                    new SolidColorBrush(Color.FromRgb(64, 255, 255)),
                    new SolidColorBrush(Color.FromRgb(255, 255, 64)),
                    new SolidColorBrush(Color.FromRgb(255, 64, 255)),
                    new SolidColorBrush(Color.FromRgb(128, 128, 255))
        };
    }
}
